package cn.edu.suse.epilepsy.controller;


import cn.edu.suse.epilepsy.common.R;
import cn.edu.suse.epilepsy.entity.pojo.SignupActivity;
import cn.edu.suse.epilepsy.service.SignupActivityService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/signup")
public class SignupActivityController {


    @Autowired
    private SignupActivityService signupActivityService;


    @GetMapping("/list/{id}")
    public R list(@PathVariable Integer id) {
        List<SignupActivity> patients = signupActivityService.list(new QueryWrapper<SignupActivity>().eq("patient_activity_id", id));
        return R.success(patients);
    }

}
